exports.setSession = function(req,res,next){
  req.session.username = req.body.username;
  next();
}
exports.checkSession = function(req,res,next){
  if(req.session.username){
    next();
  }else{
    res.redirect('/admin/login');
  };
}